Does anyone know how to get the current port and server information from dxl? I know i can use getenv() to get the default ones but we have a few different servers that we connect to via different shortcuts with port and server information supplied on the shortcut. |
Re: Retrieving Database connection information
If you add string "DOORS" to your environment variable name, and turn it to upper case, you can retrieve the current actual value. So if you use the "-d" command line switch to re-direct a shortcut to a different database, the following DXL will print different results:
string DefDB = getenv("data")
string CurrDB = getenv("DOORSDATA")
string UnkDB = getenv("doorsData") // won't work, not all upper case
print "Def/Curr/Unk = [" DefDB "]\t[" CurrDB "]\t[" UnkDB "]\n"
if (DefDB != CurrDB) then print "\tusing Command Line Switch Override\n"
|
Re: Retrieving Database connection information |